]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceAnimation: Don't exclude minimized windows
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 28 Apr 2026 11:49:58 +0000 (13:49 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 2 Aug 2026 16:48:24 +0000 (18:48 +0200)
We may be switching workspaces because we are focusing a window
that is located on a different workspace.

In case that new focus window was minimized, it currently just pops
up out of nowhere after the animation, as we are only tracking windows
that are visible at the beginning of the transition.

To fix this, don't exclude minimized windows from tracking, but hide
them until they are unminimized.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4199>
(cherry picked from commit 620efa31cd2669ef22e6dc24f2a5dca70918ff57)

js/ui/workspaceAnimation.js

index 844bac4511b433c9e3f0b10bc3aac718e77243a3..fcfda8a57be2f8cfa6d1b8d2b0cf917a0f23b3d2 100644 (file)
@@ -76,10 +76,20 @@ class BaseWorkspaceGroup extends Clutter.Actor {
             this._windowRecords.splice(this._windowRecords.indexOf(record), 1);
         }, this);
 
+        windowActor.meta_window.connectObject('notify::minimized',
+            () => this._syncCloneVisibility(clone),
+            this);
+        this._syncCloneVisibility(clone);
+
         this._windowRecords.push(record);
         return clone;
     }
 
+    _syncCloneVisibility(clone) {
+        const window = clone.source.meta_window;
+        clone.visible = window.showing_on_its_workspace();
+    }
+
     _removeWindows() {
         for (const record of this._windowRecords)
             record.clone.destroy();
@@ -102,7 +112,7 @@ class WorkspaceGroup extends BaseWorkspaceGroup {
     }
 
     _shouldShowWindow(window) {
-        if (!window.showing_on_its_workspace() || this._isDesktopWindow(window))
+        if (this._isDesktopWindow(window))
             return false;
 
         if (window.is_override_redirect())